<?php
/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2017/11/17
 * Time: 17:06
 */

namespace app\admin\validate;
use think\Validate;

class Lesson extends Validate
{
    protected $rule = [
      //  "city_id" => 'require', "允许为空，当为空时，所在城市为不受限制"
        "subject_id" => "require",
        "program_id" => "require",
        "lesson_name" => "require",
        "grade_id" => "require",
        "lesson_method" => "require",
        "service_target_id" => "require",
        "lesson_nature_id" => "require",
        "adapt_crowd" => "require",
        "lesson_feature" => "require",
        "class_id" => "require",
        "lesson_time_description" => "require",
        "one_lesson_time" => "require|number",
        "classroom_id" => "require",
        "classroom_description" =>"require",
        "cost_type" => "require",
        "lesson_cost" =>"require|number",
        "is_comment" => "require",
        "is_reclass" => "require",
        "cost_type_description" => "require",
        "start_lesson_id" => "require",
        "teacher_id" => "require",
        "teacher_group_description" => "require",
        "add_description" => "require"

    ];
    protected $message = [
       // "city_id.require" =>"所在地区选项框不能为空",
        "subject_id.require" =>"学科科目选项框不能为空",
        "program_id.require" =>"课题科目选项框不能为空",
        "lesson_name.require" =>"课程名称输入框不能为空",
        "grade_id.require" =>"年级多选框不能为空",
        "lesson_method.require" =>"课授课方式选项框不能为空",
        "service_target_id.require" =>"核心服务目标不能为空",
        "lesson_nature_id.require" =>"主要教学风格不能为空",
        "adapt_crowd.require" =>"适合人群描述输入框不能为空",

        "lesson_feature.require" =>"课程特色输入框不能为空",

        "class_id.require" =>"班型选项框不能为空",
        "lesson_time_description.require"=>"授课时间输入框不能为空",

        "one_lesson_time.require"=>"每次时长输入框不能为空",
        "one_lesson_time.number" =>"请输入正整数",
        "classroom_id.require" =>"教室地点选项框不能为空",
        "classroom_description.require" =>"教室发布地点描述输入框不能为空",

        "cost_type.require" =>"付费方式选项框不能为空",
        "lesson_cost.require" =>"共需花费输入框不能为空",
        "lesson_cost.number" =>"请输入正整数",
        "is_comment.require" =>"是否同步评价选项框不能为空",
        "is_reclass.require" =>"是否重上选项框不能为空",
        "cost_type_description.require" =>"结算方式说明输入框不能为空",

        "start_lesson_id.require" =>"开课时间选项框不能为空",
        "teacher_id.require" =>"授课教师选项框不能为空",
        "teacher_group_description.require" =>"授课团队输入框不能为空",

        "add_description.require" =>"补充说明输入框不能为空",


    ];
    protected $scene = [
      "add_lesson"  => [],
      "edit_lesson"  => []
    ];
}